package me.send.data.service.provider;

import java.util.Map;

import me.send.business.base.Pager;

public class VersionProvider {
    
    public String list(Map<String, Object> param) {
    	String sql = "select * from version  where 1=1 ";
    	if (param != null) {
    		Integer type=(Integer) param.get("type");
    		Pager page=(Pager) param.get("page");
    		if (type!=null&&type >= 0) {
    			sql += "and type=" + type;
    		}
    		sql += " limit " + page.getStart() + "," + page.getRows();
    	}
    	return sql;
    }
    public String count(Map<String, Object> param) {
    	String sql = "select count(1) from version  where 1=1 ";
    	if (param != null) {
    		Integer type=(Integer) param.get("type");
    		if (type!=null&&type >= 0) {
    			sql += "and type=" + type;
    		}
    	}
    	return sql;
    }
    
    
    
}
